Skip to content

feat(reporter): add ignoreFailedRetries option to avoid duplicate results during retries#195

Open
yarikpavlin wants to merge 3 commits into
elaichenkov:mainfrom
yarikpavlin:feature/filter-retries
Open

feat(reporter): add ignoreFailedRetries option to avoid duplicate results during retries#195
yarikpavlin wants to merge 3 commits into
elaichenkov:mainfrom
yarikpavlin:feature/filter-retries

Conversation

@yarikpavlin

Copy link
Copy Markdown

What

This MR introduces a new reporter option: ignoreFailedRetries.

When enabled, the reporter will skip all failed retry attempts if the test eventually passes. This helps reduce noise and avoids sending multiple results for the same test case.

Why

In Zephyr, each retry attempt can create a separate test result with a different status (e.g. "blocked", "failed") within the same test cycle. This leads to confusion and inflated reporting, even when the test eventually succeeds.

By enabling ignoreFailedRetries, only the first successful retry is reported — resulting in cleaner and more accurate test cycles.

Changes

  • ✅ Added ignoreFailedRetries flag to the reporter config (default: false)
  • ✅ Implemented filtering logic in onTestEnd
  • ✅ Updated README with usage example and rationale
  • ✅ Added test to verify ignoreFailedRetries behavior

Backward Compatibility

  • ✅ Feature is disabled by default, preserving current behavior for existing users

@yarikpavlin

Copy link
Copy Markdown
Author

@elaichenkov I'd appreciate your review whenever you have a chance 🙌
Let me know if anything needs to be adjusted!

@elaichenkov elaichenkov self-assigned this Aug 7, 2025
Comment thread README.md
}
```

### Optional: Ignore failed retries

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please move this section before/after custom field

@elaichenkov

Copy link
Copy Markdown
Owner

Hi @yarikpavlin,

Thank you for your contribution. Have you tested these changes with your zephyr? Which one do you have? Cloud or server? I don't have access to the zephyr anymore so can't test it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants